







<div class="x-body">
    <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so">
            {if condition='$type eq 1'}    <input type="text" name="search_data"  placeholder="支持标题" autocomplete="off" value="{:input('search_data')}"  class="layui-input">{/if}

            <button class="layui-btn"  id="search"  url="{:url('investmentlist')}"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
        </form>
    </div>
    <xblock>
        <button class="layui-btn layui-btn-danger" onclick="delAll()"><i class="layui-icon"></i>批量删除</button>
        <button class="layui-btn" ><ob_link><a  href="{:url('investmentAdd',['type'=>$type])}" style="color: white"> 新 增</a></ob_link></button>
        <span class="x-right" style="line-height:40px">共有数据：{$list.count} 条</span>
    </xblock>
    <table class="layui-table x-admin">
        <thead>
        <tr>
            <th>
                <div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div>
            </th>
            <th>序号</th>
            <th>标题</th>
            <th>最高分红收益(%)</th>
            <th>用户分红比例(%)</th>
            <th>赌王分红比例(%)</th>
            <th>止盈率(%)</th>
            <th>止损率(%)</th>
            <th>分类图片</th>
            <th>分类背景</th>
            <th>价格</th>
            <th>最低众筹总额</th>
            <th>委托上限金额</th>
            <th>开始时间</th>
            <!-- <th>当前产品开始时间</th> -->
            <th>众筹周期(天数)</th>
            <th>交易员接单时间(分钟)</th>
            <th>游戏周期(天数)</th>
            <!-- <th>当前产品众筹结束时间</th> -->
            <th>状态</th>
            <th>时间</th>
            <th>操作</th>
        </thead>
        {notempty name='list.list'}
        <tbody>
        {if condition='$type eq 1'}
                {volist name='list.list' id='vo' key="k"}
                <tr>
                    <td>
                        <div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id='{$vo.id}'><i class="layui-icon">&#xe605;</i></div>
                    </td>
                    <td>{$k}</td>
                    <td>{$vo->name}</td>
                    <td>{$vo.max_bonus}%</td>
                    <td>{$vo.user_bonus}%</td>
                    <td>{$vo.king_bonus}%</td>
                    <td>{$vo.winning_rate}%</td>
                    <td>{$vo.stop_loss_rate}%</td>
                    <td>
                        <a href="{$vo.image}" target="_blank"><img class="admin-list-img-size" src="{$vo.image}"/></a>
                    </td>
                    <td>
                        <a href="{$vo.back_image}" target="_blank"><img class="admin-list-img-size" src="{$vo.back_image}"/></a>
                    </td>
                    <td>{$vo.price}</td>
                    <td>{$vo.financing_total}</td>
                    <td>{$vo.superior_money}</td>
                    <td>{$vo.start_time}</td>
                    <!-- <td>{$vo.start_time_int|date='Y-m-d H:i:s' , ###}</td> -->
                    <td>{$vo.cycle}天</td>
                    <td>{$vo.receipt_minute}分钟</td>
                    <td>{$vo.start_game_time}天</td>
                    <!-- <td>{$vo.start_game_int|date='Y-m-d H:i:s' , ###}</td> -->
                    <td>
                        {if condition="$vo['status'] eq 1"}
                        <ob_link><a class="ajax-get" href="{:url('setStatus', array('ids' => $vo['id'], 'status' =>0))}">  <span class='badge bg-green'>启用</span></a></ob_link>

                        {else/}
                        <ob_link><a class="ajax-get" href="{:url('setStatus', array('ids' => $vo['id'], 'status' => 1))}">  <span class='badge bg-red'>禁用</span></a></ob_link>

                        {/if}

                    </td>
                    <td>{$vo.create_time|date='Y-m-d H:i:s',###}</td>
                    <td class="td-manage">
                        <!--<a onclick="member_stop(this,'10001')" href="javascript:;"  title="启用">-->
                        <!--<i class="layui-icon">&#xe601;</i>-->
                        <!--</a>-->
                        <ob_link><a title="编辑"  href="{:url('investmentEdit', array('id' => $vo['id'],'type'=>$type))}" >
                            <i class="layui-icon">&#xe642;</i>
                        </a></ob_link>
                        <ob_link><a title="删 除" class="ajax-get"  href="{:url('setStatus', array('ids' => $vo['id'], 'status' => -1))}" >
                            <i class="layui-icon">&#xe640;</i>
                        </a></ob_link>
                    </td>
                </tr>
                {/volist}
        {else/}
                {volist name='list.list' id='vo' key="k"}
                <tr>
                    <td>
                        <div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id='{$vo.id}'><i class="layui-icon">&#xe605;</i></div>
                    </td>
                    <td>{$k}</td>

                    <td>{$vo.bonus}%</td>
                    <td>{$vo.min_bonus}%--{$vo.max_bonus}%</td>

                    <td>{$vo.create_time|date='Y-m-d H:i:s',###}</td>
                    <td class="td-manage">
                        <!--<a onclick="member_stop(this,'10001')" href="javascript:;"  title="启用">-->
                        <!--<i class="layui-icon">&#xe601;</i>-->
                        <!--</a>-->
                        <ob_link><a title="编辑"  href="{:url('investmentEdit', array('id' => $vo['id'],'type'=>$type))}" >
                            <i class="layui-icon">&#xe642;</i>
                        </a></ob_link>
                        <ob_link><a title="删 除" class="ajax-get"  href="{:url('setStatus', array('ids' => $vo['id'], 'status' => -1))}" >
                            <i class="layui-icon">&#xe640;</i>
                        </a></ob_link>
                    </td>
                </tr>
        {/volist}
        {/if}

        {else/}
        <tbody><tr class="odd"><td colspan="12" class="text-center" valign="top">{:config('empty_list_describe')}</td></tr></tbody>
        {/notempty}

        </tbody>
    </table>
    <div class="page">
        {notempty name='list'}   {$list.list->render()}{/notempty}
    </div>

</div>
<script>
    layui.use('form', function(){
        form = layui.form;

    });
    function delAll (argument) {

        var data = tableCheck.getData();


        layer.confirm('确认要删除吗？',function(index){
            //捉到所有被选中的，发异步进行删除
            //监听提交
            var url="{:url('setStatus')}";
            $.post(url,{ids:data,status:-1},function (d) {
                if(d.code==1){
                    $(".layui-form-checked").not('.header').parents('tr').remove();
                    layer.msg('删除成功', {icon: 1});

                }else{
                    layer.msg(d.msg);

                }
            },'json');



        });
    }
</script>

</body>

</html>


